package com.android.stockme.backend.configuration;


public class StockConfiguration implements IStockConfiguration {


	private String symbol;
	private boolean hasHigh;
	private boolean hasLow;
	private float high;
	private float low;
	
	
	public StockConfiguration(String symbol, float high , float low)
	{
		this.symbol = symbol;
		this.high = high;
		this.low = low;
		this.hasHigh = true;
		this.hasLow = true;
	}
	
	public StockConfiguration(String symbol)
	{
		this.symbol = symbol;
		this.high = 0;
		this.low = 0;
		this.hasHigh = false;
		this.hasLow = false;
	}
	
	public StockConfiguration(String symbol, float value, String type)
	{
		this.symbol = symbol;
		
		if (type.equals("LOW"))
		{
			this.high = 0;
			this.low = value;
			this.hasHigh = false;
			this.hasLow = true;
		}
		else//high
		{
			this.high = value;
			this.low = 0;
			this.hasHigh = true;
			this.hasLow = false;
		}
	}

	public StockConfiguration(String symbol, boolean hasHigh, float high, boolean hasLow, float low)
	{
		this.symbol = symbol;
		this.high = high;
		this.low = low;
		this.hasHigh = hasHigh;
		this.hasLow = hasLow;

	}
	
	public float getHighBound() {
		
			return this.high;

	}

	public float getLowBound() {

			return this.low;

	}

	public String getStockSymbol() {
		
		return this.symbol;
	}

	public boolean isHighBoundConfigured() {
		
		return this.hasHigh;
	}

	public boolean isLowBoundConfigured() {
		
		return this.hasLow;
	}

	public void setHighBound(float high) {
		
		this.high = high;

	}

	public void setLowBound(float low) {

		this.low = low;

	}
	
	public void setLowEnableDisable(boolean bool)
	{
		this.hasLow = bool;
	}
	
	
	public void setHighEnableDisable(boolean bool)
	{
		this.hasHigh = bool;
	}

}
